<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">

        <!--加上key之後會使用diff算法提高渲染速率-->
       <span v-for="(item,index) in arr" :key="index">{{index}}:{{item}} <br></span>

        <ul>
            <li v-for="(val,key,index) in obj" :key="index">
                {{index}} : {{key}} : {{val}}
            </li>
        </ul>
    </div>
</body>
<script src="./js/vue.js"></script>
<script>
    Vue.config.productionTip = false
    new Vue({
        el:"#app",
        data:{
            arr:["damu","zdy","laoliu","laoqiu","laoli","laolaolaozhang"],
            obj:{
              a:"aa",
              b:"bb",
              c:"cc"
            }
        }
    })
</script>
</html>